#import <Foundation/Foundation.h>
#import <AVFoundation/AVFoundation.h>
@class XMAudioRecorder;
@protocol XMAudioRecorderDelegate <NSObject>
@optional
- (void)audioRecorderDidVoiceChanged:(XMAudioRecorder *)recorder value:(double)value;
- (void)audioRecorderDidFinished:(XMAudioRecorder *)recorder successfully:(BOOL)flag;
@end


@interface XMAudioRecorder : NSObject
@property (nonatomic, assign) BOOL isClose;
@property (nonatomic, assign) BOOL isRecording;
+ (XMAudioRecorder *)shareInstance;
- (void)setRecorderDelegate:(id<XMAudioRecorderDelegate>)recorderDelegate;
- (void)setRecorderSetting:(NSMutableDictionary *)settingDict;
- (NSError *)startRecordWithFilePath:(NSString *)filePath;
- (void)stopRecord;
- (void)pauseRecord;
- (void)resumeRecord;
- (NSString *)getRecordFilePath;
- (NSTimeInterval)getRecordDurationWithFilePath:(NSString *)filePath;
- (AVAudioRecorder *)getAVAudioRecorder;
@end
